package com.cgnpc.scp.common.service;

import com.cgnpc.cuddemo.workbench.application.IPermissonApplication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RoleService {

    @Autowired
    private IPermissonApplication permissonApplication;

    /**
     * 是否拥有"hseadmin"权限
     *
     * @return true拥有；false不拥有；
     */
    public boolean hasRoleWithHseAdmin() {
        // hseadmin角色能查询所有数据，其他必须带上meetingUser值
        return permissonApplication.hasRoles(IPermissonApplication.ROLE_NAME_HSEADMIN);
    }

}
